﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using PMS.SANY.Util;

namespace PMS.SANY.Entity
{
    /// <summary>
    /// 产品Bom清单树
    /// </summary>
    public partial class MaterialBomTree : BusEntity, ITreeModel<MaterialBomTree>
    {
        /// <summary>
        /// 上级Bom清单Id
        /// </summary>
        public string ParentId { set; get; }
        /// <summary>
        /// 产品BomId
        /// </summary>
        public string BomId { get; set; }
        /// <summary>
        /// 组成物料Id
        /// </summary>
        public string MaterialId { set; get; }
        /// <summary>
        /// 物料规格Id
        /// </summary>
        public string SpecId { set; get; }
        /// <summary>
        /// Bom清单编码
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// Bom清单名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public int Quantity { set; get; }

        /// <summary>
        /// 是否包含子级
        /// </summary>
        public bool HasChild { set; get; }
    }

    public partial class MaterialBomTree : BusEntity
    {
        /// <summary>
        /// 上级实体
        /// </summary>
        public MaterialBomTree Parent { set; get; }
        /// <summary>
        /// 下级实体
        /// </summary>
        public List<MaterialBomTree> Children { set; get; }
        /// <summary>
        /// 产品Bom实体
        /// </summary>
        public MaterialBom Product { set; get; }
        /// <summary>
        /// 组成物料实体
        /// </summary>
        public MaterielInfor Materiel { set; get; }
        /// <summary>
        /// 物料规格实体
        /// </summary>
        public MaterielSpec Spec { set; get; }
    }

    /// <summary>
    /// 实体配置
    /// OnModelCreating
    /// </summary>
    public class MaterialBomTreeTypeConfig : BusEntityTypeConfig<MaterialBomTree>, IEntityTypeConfiguration<MaterialBomTree>
    {
        public override void Configure(EntityTypeBuilder<MaterialBomTree> builder)
        {
            base.Configure(builder);

            #region 主外键关系
            builder.HasOne(p => p.Parent).WithMany(p => p.Children).HasForeignKey(p => p.ParentId);
            builder.HasOne(p => p.Product).WithMany(p => p.BomTrees).HasForeignKey(p => p.BomId);
            builder.HasOne(p => p.Materiel).WithMany().HasForeignKey(p => p.MaterialId);
            builder.HasOne(p => p.Spec).WithMany().HasForeignKey(p => p.SpecId);
            #endregion

            #region 字段属性:最大长度,是否必需,默认值
            builder.Property(p => p.ParentId).HasMaxLength(EntityDefinition.DefSmallColLen);
            builder.Property(p => p.BomId).HasMaxLength(EntityDefinition.DefSmallColLen).IsRequired();            
            builder.Property(p => p.MaterialId).HasMaxLength(EntityDefinition.DefSmallColLen).IsRequired();
            builder.Property(p => p.SpecId).HasMaxLength(EntityDefinition.DefSmallColLen).IsRequired();

            builder.Property(p => p.Code).HasMaxLength(EntityDefinition.DefSmallColLen).IsRequired();
            builder.Property(p => p.Name).HasMaxLength(EntityDefinition.DefSmallColLen).IsRequired();
            builder.Property(p => p.Quantity).HasDefaultValue(1);
            #endregion

            #region 备注
            builder.HasComment("产品Bom清单树");
            builder.Property(p => p.BomId).HasComment("产品BomId");
            builder.Property(p => p.ParentId).HasComment("上级Bom清单Id");
            builder.Property(p => p.MaterialId).HasComment("组成物料Id");
            builder.Property(p => p.SpecId).HasComment("物料规格Id");
            builder.Property(p => p.Code).HasComment("Bom清单编码");
            builder.Property(p => p.Name).HasComment("Bom清单名称");
            builder.Property(p => p.Quantity).HasComment("数量");
            builder.Property(p => p.HasChild).HasComment("是否包含子级");
            #endregion

            #region 种子数据
            //builder.HasData(new MaterialBomTree() { Id = "1", ParentId = null, BomId = "11", Code = "10", Name = "封头总成", HasChild=false, MaterialId = "1001", SpecId = "100101", Quantity=1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "2", ParentId = null, BomId = "12", Code = "10", Name = "封头总成", HasChild = false, MaterialId = "1001", SpecId = "100103", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "3", ParentId = null, BomId = "13", Code = "10", Name = "封头总成", HasChild = false, MaterialId = "1001", SpecId = "100104", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "4", ParentId = null, BomId = "14", Code = "10", Name = "封头总成", HasChild = false, MaterialId = "1001", SpecId = "100105", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "5", ParentId = null, BomId = "15", Code = "10", Name = "封头总成", HasChild = false, MaterialId = "1001", SpecId = "100105", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "6", ParentId = null, BomId = "16", Code = "10", Name = "封头总成", HasChild = false, MaterialId = "1001", SpecId = "100106", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "7", ParentId = null, BomId = "17", Code = "10", Name = "封头总成", HasChild = false, MaterialId = "1001", SpecId = "100106", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "8", ParentId = null, BomId = "18", Code = "10", Name = "封头总成", HasChild = false, MaterialId = "1001", SpecId = "100106", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "9", ParentId = null, BomId = "19", Code = "10", Name = "封头总成", HasChild = false, MaterialId = "1001", SpecId = "100102", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "10", ParentId = null, BomId = "20", Code = "10", Name = "封头总成", HasChild = false, MaterialId = "1001", SpecId = "100101", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });

            //builder.HasData(new MaterialBomTree() { Id = "21", ParentId = null, BomId = "11", Code = "01", Name = "前锥段", HasChild = true, MaterialId = "1002", SpecId = "100201", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "22", ParentId = null, BomId = "12", Code = "01", Name = "前锥段", HasChild = true, MaterialId = "1002", SpecId = "100203", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "23", ParentId = null, BomId = "13", Code = "01", Name = "前锥段", HasChild = true, MaterialId = "1002", SpecId = "100204", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "24", ParentId = null, BomId = "14", Code = "01", Name = "前锥段", HasChild = true, MaterialId = "1002", SpecId = "100205", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "25", ParentId = null, BomId = "15", Code = "01", Name = "前锥段", HasChild = true, MaterialId = "1002", SpecId = "100205", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "26", ParentId = null, BomId = "16", Code = "01", Name = "前锥段", HasChild = true, MaterialId = "1002", SpecId = "100206", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "27", ParentId = null, BomId = "17", Code = "01", Name = "前锥段", HasChild = true, MaterialId = "1002", SpecId = "100206", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "28", ParentId = null, BomId = "18", Code = "01", Name = "前锥段", HasChild = true, MaterialId = "1002", SpecId = "100206", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "29", ParentId = null, BomId = "19", Code = "01", Name = "前锥段", HasChild = true, MaterialId = "1002", SpecId = "100202", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "30", ParentId = null, BomId = "20", Code = "01", Name = "前锥段", HasChild = true, MaterialId = "1002", SpecId = "100201", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });

            //builder.HasData(new MaterialBomTree() { Id = "121", ParentId = "21", BomId = "11", Code = "06", Name = "前锥拼板", HasChild = false, MaterialId = "10021", SpecId = "1002011", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "122", ParentId = "22", BomId = "12", Code = "06", Name = "前锥拼板", HasChild = false, MaterialId = "10021", SpecId = "1002031", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "123", ParentId = "23", BomId = "13", Code = "06", Name = "前锥拼板", HasChild = false, MaterialId = "10021", SpecId = "1002041", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "124", ParentId = "24", BomId = "14", Code = "06", Name = "前锥拼板", HasChild = false, MaterialId = "10021", SpecId = "1002051", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "125", ParentId = "25", BomId = "15", Code = "06", Name = "前锥拼板", HasChild = false, MaterialId = "10021", SpecId = "1002051", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "126", ParentId = "26", BomId = "16", Code = "06", Name = "前锥拼板", HasChild = false, MaterialId = "10021", SpecId = "1002061", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "127", ParentId = "27", BomId = "17", Code = "06", Name = "前锥拼板", HasChild = false, MaterialId = "10021", SpecId = "1002061", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "128", ParentId = "28", BomId = "18", Code = "06", Name = "前锥拼板", HasChild = false, MaterialId = "10021", SpecId = "1002061", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "129", ParentId = "29", BomId = "19", Code = "06", Name = "前锥拼板", HasChild = false, MaterialId = "10021", SpecId = "1002021", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "130", ParentId = "30", BomId = "20", Code = "06", Name = "前锥拼板", HasChild = false, MaterialId = "10021", SpecId = "1002011", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });

            //builder.HasData(new MaterialBomTree() { Id = "31", ParentId = null, BomId = "11", Code = "02", Name = "中筒段", HasChild = true, MaterialId = "1003", SpecId = "100301", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "32", ParentId = null, BomId = "12", Code = "02", Name = "中筒段", HasChild = true, MaterialId = "1003", SpecId = "100303", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "33", ParentId = null, BomId = "13", Code = "02", Name = "中筒段", HasChild = true, MaterialId = "1003", SpecId = "100304", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "34", ParentId = null, BomId = "14", Code = "02", Name = "中筒段", HasChild = true, MaterialId = "1003", SpecId = "100305", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "35", ParentId = null, BomId = "15", Code = "02", Name = "中筒段", HasChild = true, MaterialId = "1003", SpecId = "100306", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "36", ParentId = null, BomId = "16", Code = "02", Name = "中筒段", HasChild = true, MaterialId = "1003", SpecId = "100307", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "37", ParentId = null, BomId = "17", Code = "02", Name = "中筒段", HasChild = true, MaterialId = "1003", SpecId = "100308", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "38", ParentId = null, BomId = "18", Code = "02", Name = "中筒段", HasChild = true, MaterialId = "1003", SpecId = "100309", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "39", ParentId = null, BomId = "19", Code = "02", Name = "中筒段", HasChild = true, MaterialId = "1003", SpecId = "100302", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            ////builder.HasData(new MaterialBomTree() { Id = "40", ParentId = null, BomId = "20", Code = "02", Name = "圆柱段", HasChild = true, MaterialId = "1003", SpecId = "100201", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });

            //builder.HasData(new MaterialBomTree() { Id = "131", ParentId = "31", BomId = "11", Code = "07", Name = "中筒拼板", HasChild = false, MaterialId = "10031", SpecId = "1003011", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "132", ParentId = "32", BomId = "12", Code = "07", Name = "中筒拼板", HasChild = false, MaterialId = "10031", SpecId = "1003031", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "133", ParentId = "33", BomId = "13", Code = "07", Name = "中筒拼板", HasChild = false, MaterialId = "10031", SpecId = "1003041", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "134", ParentId = "34", BomId = "14", Code = "07", Name = "中筒拼板", HasChild = false, MaterialId = "10031", SpecId = "1003051", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "135", ParentId = "35", BomId = "15", Code = "07", Name = "中筒拼板", HasChild = false, MaterialId = "10031", SpecId = "1003061", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "136", ParentId = "36", BomId = "16", Code = "07", Name = "中筒拼板", HasChild = false, MaterialId = "10031", SpecId = "1003071", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "137", ParentId = "37", BomId = "17", Code = "07", Name = "中筒拼板", HasChild = false, MaterialId = "10031", SpecId = "1003081", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "138", ParentId = "38", BomId = "18", Code = "07", Name = "中筒拼板", HasChild = false, MaterialId = "10031", SpecId = "1003091", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "139", ParentId = "39", BomId = "19", Code = "07", Name = "中筒拼板", HasChild = false, MaterialId = "10031", SpecId = "1003021", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            ////builder.HasData(new MaterialBomTree() { Id = "140", ParentId = "40", BomId = "20", Code = "07", Name = "中筒拼板", HasChild = true, MaterialId = "1003", SpecId = "1002011", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });

            //builder.HasData(new MaterialBomTree() { Id = "41", ParentId = null, BomId = "11", Code = "03", Name = "后锥前段", HasChild = true, MaterialId = "1004", SpecId = "100401", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "42", ParentId = null, BomId = "12", Code = "03", Name = "后锥前段", HasChild = true, MaterialId = "1004", SpecId = "100403", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "43", ParentId = null, BomId = "13", Code = "03", Name = "后锥前段", HasChild = true, MaterialId = "1004", SpecId = "100404", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "44", ParentId = null, BomId = "14", Code = "03", Name = "后锥前段", HasChild = true, MaterialId = "1004", SpecId = "100405", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "45", ParentId = null, BomId = "15", Code = "03", Name = "后锥前段", HasChild = true, MaterialId = "1004", SpecId = "100406", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "46", ParentId = null, BomId = "16", Code = "03", Name = "后锥前段", HasChild = true, MaterialId = "1004", SpecId = "100408", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            ////builder.HasData(new MaterialBomTree() { Id = "47", ParentId = null, BomId = "17", Code = "03", Name = "后锥前段", HasChild = true, MaterialId = "1004", SpecId = "100406", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "48", ParentId = null, BomId = "18", Code = "03", Name = "后锥前段", HasChild = true, MaterialId = "1004", SpecId = "100407", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "49", ParentId = null, BomId = "19", Code = "03", Name = "后锥前段", HasChild = true, MaterialId = "1004", SpecId = "100402", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "50", ParentId = null, BomId = "20", Code = "03", Name = "后锥前段", HasChild = true, MaterialId = "1004", SpecId = "100402", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });

            //builder.HasData(new MaterialBomTree() { Id = "141", ParentId = "41", BomId = "11", Code = "08", Name = "后锥前拼板", HasChild = false, MaterialId = "10041", SpecId = "1004011", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "142", ParentId = "42", BomId = "12", Code = "08", Name = "后锥前拼板", HasChild = false, MaterialId = "10041", SpecId = "1004031", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "143", ParentId = "43", BomId = "13", Code = "08", Name = "后锥前拼板", HasChild = false, MaterialId = "10041", SpecId = "1004041", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "144", ParentId = "44", BomId = "14", Code = "08", Name = "后锥前拼板", HasChild = false, MaterialId = "10041", SpecId = "1004051", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "145", ParentId = "45", BomId = "15", Code = "08", Name = "后锥前拼板", HasChild = false, MaterialId = "10041", SpecId = "1004061", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "146", ParentId = "46", BomId = "16", Code = "08", Name = "后锥前拼板", HasChild = false, MaterialId = "10041", SpecId = "1004081", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            ////builder.HasData(new MaterialBomTree() { Id = "147", ParentId = "47", BomId = "17", Code = "08", Name = "后锥前拼板", HasChild = false, MaterialId = "10041", SpecId = "1004061", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "148", ParentId = "48", BomId = "18", Code = "08", Name = "后锥前拼板", HasChild = false, MaterialId = "10041", SpecId = "1004071", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "149", ParentId = "49", BomId = "19", Code = "08", Name = "后锥前拼板", HasChild = false, MaterialId = "10041", SpecId = "1004021", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "150", ParentId = "50", BomId = "20", Code = "08", Name = "后锥前拼板", HasChild = false, MaterialId = "10041", SpecId = "1004021", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });

            //builder.HasData(new MaterialBomTree() { Id = "51", ParentId = null, BomId = "11", Code = "04", Name = "后锥后段", HasChild = true, MaterialId = "1005", SpecId = "100501", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "52", ParentId = null, BomId = "12", Code = "04", Name = "后锥后段", HasChild = true, MaterialId = "1005", SpecId = "100503", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "53", ParentId = null, BomId = "13", Code = "04", Name = "后锥后段", HasChild = true, MaterialId = "1005", SpecId = "100504", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "54", ParentId = null, BomId = "14", Code = "04", Name = "后锥后段", HasChild = true, MaterialId = "1005", SpecId = "100505", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "55", ParentId = null, BomId = "15", Code = "04", Name = "后锥后段", HasChild = true, MaterialId = "1005", SpecId = "100506", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "56", ParentId = null, BomId = "16", Code = "04", Name = "后锥后段", HasChild = true, MaterialId = "1005", SpecId = "100508", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            ////builder.HasData(new MaterialBomTree() { Id = "57", ParentId = null, BomId = "17", Code = "04", Name = "后锥后段", HasChild = true, MaterialId = "1005", SpecId = "100506", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "58", ParentId = null, BomId = "18", Code = "04", Name = "后锥后段", HasChild = true, MaterialId = "1005", SpecId = "100507", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "59", ParentId = null, BomId = "19", Code = "04", Name = "后锥后段", HasChild = true, MaterialId = "1005", SpecId = "100502", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "60", ParentId = null, BomId = "20", Code = "04", Name = "后锥后段", HasChild = true, MaterialId = "1005", SpecId = "100502", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });

            //builder.HasData(new MaterialBomTree() { Id = "151", ParentId = "51", BomId = "11", Code = "04", Name = "后锥后拼板", HasChild = false, MaterialId = "10051", SpecId = "1005011", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "152", ParentId = "52", BomId = "12", Code = "04", Name = "后锥后拼板", HasChild = false, MaterialId = "10051", SpecId = "1005031", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "153", ParentId = "53", BomId = "13", Code = "04", Name = "后锥后拼板", HasChild = false, MaterialId = "10051", SpecId = "1005041", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "154", ParentId = "54", BomId = "14", Code = "04", Name = "后锥后拼板", HasChild = false, MaterialId = "10051", SpecId = "1005051", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "155", ParentId = "55", BomId = "15", Code = "04", Name = "后锥后拼板", HasChild = false, MaterialId = "10051", SpecId = "1005061", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "156", ParentId = "56", BomId = "16", Code = "04", Name = "后锥后拼板", HasChild = false, MaterialId = "10051", SpecId = "1005081", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            ////builder.HasData(new MaterialBomTree() { Id = "157", ParentId = "57", BomId = "17", Code = "04", Name = "后锥后拼板", HasChild = false, MaterialId = "10051", SpecId = "100206", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "158", ParentId = "58", BomId = "18", Code = "04", Name = "后锥后拼板", HasChild = false, MaterialId = "10051", SpecId = "1005071", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "159", ParentId = "59", BomId = "19", Code = "04", Name = "后锥后拼板", HasChild = false, MaterialId = "10051", SpecId = "1005021", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "160", ParentId = "60", BomId = "20", Code = "04", Name = "后锥后拼板", HasChild = false, MaterialId = "10051", SpecId = "1005021", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });

            //builder.HasData(new MaterialBomTree() { Id = "61", ParentId = null, BomId = "11", Code = "15", Name = "滚道", HasChild = false, MaterialId = "1011", SpecId = "101101", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "62", ParentId = null, BomId = "12", Code = "15", Name = "滚道", HasChild = false, MaterialId = "1011", SpecId = "101103", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "63", ParentId = null, BomId = "13", Code = "15", Name = "滚道", HasChild = false, MaterialId = "1011", SpecId = "101104", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "64", ParentId = null, BomId = "14", Code = "15", Name = "滚道", HasChild = false, MaterialId = "1011", SpecId = "101105", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "65", ParentId = null, BomId = "15", Code = "15", Name = "滚道", HasChild = false, MaterialId = "1011", SpecId = "101105", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "66", ParentId = null, BomId = "16", Code = "15", Name = "滚道", HasChild = false, MaterialId = "1011", SpecId = "101107", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "67", ParentId = null, BomId = "17", Code = "15", Name = "滚道", HasChild = false, MaterialId = "1011", SpecId = "101106", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "68", ParentId = null, BomId = "18", Code = "15", Name = "滚道", HasChild = false, MaterialId = "1011", SpecId = "101106", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "69", ParentId = null, BomId = "19", Code = "15", Name = "滚道", HasChild = false, MaterialId = "1011", SpecId = "101102", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            //builder.HasData(new MaterialBomTree() { Id = "70", ParentId = null, BomId = "20", Code = "15", Name = "滚道", HasChild = false, MaterialId = "1011", SpecId = "101101", Quantity = 1, CreateUserId = "1", ModifyUserId = "1" });
            #endregion
        }
    }
}
